#ifndef BASETIMER_H
#define BASETIMER_H

#include <windows.h>
class baseTimer
{
protected:
	unsigned int m_id;
	unsigned int m_uElapse;
	HWND m_hwnd;
	unsigned int m_uidevnt;
public:
	int setTimer(HWND hwnd, unsigned int id, unsigned int uElapse);
	int killTimer();
	HWND getHwnd();
	unsigned int getID();
	virtual int onTimer(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) = 0;
};

#define MAKETIMER(timername) \
class timername: \
	public baseTimer \
{ \
public: \
	virtual int onTimer(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); \
};

#define IMPLTIMER(timername) \
int timername::onTimer(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
#endif